package com.rds.workflow.service.impl;


import com.rds.workflow.domain.RdaWorkflow2NodeRel;
import com.rds.workflow.mapper.RdaWorkflow2NodeRelMapper;
import com.rds.workflow.service.IRdaWorkflow2NodeRelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RdaWorkflow2NodeRelServiceImpl implements IRdaWorkflow2NodeRelService {
    @Autowired
    private RdaWorkflow2NodeRelMapper rdaWorkflow2NodeRelMapper;
    /**
     * 根据id查询流程节点关系
     *
     * @param id 流程节点ID
     * @return 流程节点
     */
    @Override
    public RdaWorkflow2NodeRel selectRdaWorkflow2NodeRelById(Long id) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelById(id);
    }


    @Override
    public List<RdaWorkflow2NodeRel> selectRdaWorkflow2NodeRelByToid(Long toid,Long workflowid,String opperationType) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelByToid(toid,workflowid,opperationType);
    }

    @Override
    public List<RdaWorkflow2NodeRel> selectRdaWorkflow2NodeRelByFromid(Long fromid, Long workflowid,String operationType) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelByFromid(fromid,workflowid,operationType);
    }

    /**
     * 查询流程节点关系
     * @param rdaWorkflow2NodeRel 流程节点关系列表
     * @return 流程列表流程关系集合
     */
    @Override
    public List<RdaWorkflow2NodeRel> selectRdaWorkflow2NodeRelList(RdaWorkflow2NodeRel rdaWorkflow2NodeRel) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelList(rdaWorkflow2NodeRel);
    }

    /**
     * 新增流程节点列表
     *
     * @param rdaWorkflow2NodeRel 流程节点关系列表
     * @return 结果
     */
    @Override
    public int insertRdaWorkflow2NodeRel(RdaWorkflow2NodeRel rdaWorkflow2NodeRel) {
        return rdaWorkflow2NodeRelMapper.insertRdaWorkflow2NodeRel(rdaWorkflow2NodeRel);
    }

    /**
     * 修改流程节点关系列表
     *
     * @param rdaWorkflow2NodeRel 流程节点关系列表
     * @return 结果
     */
    @Override
    public int updateRdaWorkflow2NodeRel(RdaWorkflow2NodeRel rdaWorkflow2NodeRel) {
        return rdaWorkflow2NodeRelMapper.updateRdaWorkflow2NodeRel(rdaWorkflow2NodeRel);
    }

    /**
     * 批量删除流程节点关系列表
     * @param ids 需要删除的流程节点关系列表ID
     * @return 结果
     */
    @Override
    public int deleteRdaWorkflow2NodeRelByIds(Long[] ids) {
        return rdaWorkflow2NodeRelMapper.deleteRdaWorkflow2NodeRelByIds(ids);
    }

    @Override
    public List<RdaWorkflow2NodeRel> selectRdaWorkflow2NodeRelSubordinate(Long fromid,String operationType) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelSubordinate(fromid,operationType);
    }

    @Override
    public List<RdaWorkflow2NodeRel> selectRdaWorkflow2NodeRelByOperationType(Long workflowid,String operationType) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelByOperationType(workflowid,operationType);
    }

    @Override
    public int deleteRdaWorkflow2NodeRelByWorkflowid(Long workflowid) {
        return rdaWorkflow2NodeRelMapper.deleteRdaWorkflow2NodeRelByWorkflowid(workflowid);
    }

    @Override
    public List<RdaWorkflow2NodeRel> selectRdaWorkflow2NodeRelSubordinateAll(Long fromid, String operationType) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelSubordinateAll(fromid,operationType);
    }

    @Override
    public List<RdaWorkflow2NodeRel> selectRdaWorkflow2NodeRelUpper(Long fromid, String operationType) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelUpper(fromid,operationType);
    }

    @Override
    public List<RdaWorkflow2NodeRel> selectRdaWorkflow2NodeRelByFromids(Long fromid, Long workflowid, String operationType, String operationState) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelByFromids(fromid,workflowid,operationType,operationState);
    }

    @Override
    public List<RdaWorkflow2NodeRel> selectRdaWorkflow2NodeRelByToids(Long toid, Long workflowid, String opperationType, String operationState) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelByToids(toid,workflowid,opperationType,operationState);
    }

    @Override
    public List<RdaWorkflow2NodeRel> selectRdaWorkflow2NodeRelAllList(RdaWorkflow2NodeRel rdaWorkflow2NodeRel) {
        return rdaWorkflow2NodeRelMapper.selectRdaWorkflow2NodeRelAllList(rdaWorkflow2NodeRel);
    }
}
